<?php

class GetStats extends DBConnect
{
	

	function getUser($username)
	{
		$user = mysql_query("select user_id from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$user = mysql_fetch_row($user);
		return $user[0];
	
	}
	function getWeight($username)
	{
		$weight = mysql_query("select weight from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$weight = mysql_fetch_row($weight);
		return $weight[0];
	}
	
	function getHeight($username)
	{
		$height = mysql_query("select height from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$height = mysql_fetch_row($height);
		return $height[0];
	}
	
	function getAge($username)
	{
		$age = mysql_query("select age from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$age = mysql_fetch_row($age);
		return $age[0];
	}
	
	function getActivity($username)
	{
		$activity = mysql_query("select activity from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$activity = mysql_fetch_row($activity);
		return $activity[0];
	}
	
	function getGender($username)
	{
		$gender = mysql_query("select gender from users where user_id = '$username'",  $this->conn)
		or die(mysql_error());
		$gender = mysql_fetch_row($gender);
		return $gender[0];
	}
	
// 	function getCalories ($username)
// 	{
// 		$calories =
// 		$stats->getWeight($_SESSION['username']) * 10  +
// 		$stats->getHeight($_SESSION['username']) * 10 +
// 		$stats->getAge($_SESSION['username']) * 5;
// 	}

}
?>